package com.api.gbhg.liuwenbo.test;

import java.io.*;
import java.util.Properties;
import java.util.PropertyResourceBundle;

public class confMain {

    /*public static void main(String[] args) {
        Properties props = new Properties();
        try {
            InputStream resourceAsStream1 = confMain.class.getResourceAsStream("../conf/conf.properties");
//            props.load(resourceAsStream1);
//            System.out.println(props.getProperty("a"));
            PropertyResourceBundle property = new PropertyResourceBundle(resourceAsStream1);
            System.out.println(property.getString("a"));
            System.out.println(property.getString("a"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }catch (IOException e) {
            e.printStackTrace();
        }
    }*/

    public static void main(String[] args) throws IOException {
        Properties prop=new Properties();
        prop.load(new InputStreamReader(confMain.class.getResourceAsStream("../conf/NonCentralTree.properties"), "GBK"));
        System.out.println(prop.getProperty("leaderStr"));
    }
}
